import java.util.Scanner;

public class LeapYear {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要判断的年份");
        int year = sc.nextInt();
        boolean b = year % 400 == 0 || year % 4 == 0 && year % 100 != 0;

        //if语句判断
        if (b)
            System.out.printf("%d是闰年%n", year);
        else
            System.out.printf("%d是平年%n", year);

        //三元判断
        System.out.println(year + (b ? "是闰年" : "是平年"));
    }
}
